This specification relates to calculating layout parameters for content items of an electronic document. In conventional systems, a web page is received over the Internet and interpreted by a web browser. The web browser generates a graphical representation of the web page based in part on parameters of the web page and parameters of the web page content items. The web page can be converted to a different type of electronic document, for example, a Portable Document File (PDF) format. For example, ADOBE® ACROBAT® Software (available from Adobe Systems Incorporated of San Jose, Calif.) allows a user to convert a web page to a PDF document. As another example, “plug-in” applications available for some web browser applications generate PDF documents based on web pages. As a particular example, some versions of INTERNET EXPLORER® (e.g., versions 6, 7, and 8) include a “webcapture” plug-in application that converts a web page to a PDF document.
In some cases, the entire web page, including all of the web page content items, is converted to a PDF version of the web page. In other cases, a user can designate one or more content items to be omitted from the PDF version of the web page, or a user can designate one or more content items to be the only content items included in the PDF version of the web page. The PDF version of the web page can then be generated based on the parameters used by the web browser (i.e., values specified in the HTML or CSS document) to generate a graphical representation of the web page.